<template>
    <div class="around-box">
        <van-back-top right="10vw" bottom="10vh" />
        <Pitem
        v-for="it in list"
            :key="it.id"
            :title="it.title"
            :price="it.price"
            :path="it.path"
            :wish="it.wish"
            :id="it.id"
            :it="it" 
        >
        </Pitem>   
    </div>
</template>

<script lang="ts" setup>
import Pitem from './item.vue'
import { getAroundProductsApi } from "../../../apis/productApis";
import { Ref, ref } from 'vue';
const list:Ref<Array<any>> = ref([])
getAroundList()
async function getAroundList(){
    let _res = await getAroundProductsApi()
    if(_res.code === 200){
        list.value = _res.data
    }
}
</script>

<style lang="less" scoped>
.around-box{
    width: 100vw;
    height: calc(100vh - 84px);
    overflow-x: hidden;
}
</style>

